package cn.stylefeng.guns.modular.inventory.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.Date;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;


/**
 * 库存中心的商品库存表
 * @author allen
 * @date 2021/4/11 23:22
 * @version 1.0
 */


@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName(value = "inventory_goods_stock")
public class InventoryGoodsStockEntity implements Serializable {
    /**
     * 主键
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 商品sku ID
     */
    @TableField(value = "goods_sku_id")
    private Long goodsSkuId;

    /**
     * 销售库存
     */
    @TableField(value = "sale_stock_quantity")
    private Long saleStockQuantity;

    /**
     * 锁定库存
     */
    @TableField(value = "locked_stock_quantity")
    private Long lockedStockQuantity;

    /**
     * 已销售库存
     */
    @TableField(value = "saled_stock_quantity")
    private Long saledStockQuantity;

    /**
     * 库存状态，0：无库存，1：有库存
     */
    @TableField(value = "stock_status")
    private Integer stockStatus;

    /**
     * 创建时间
     */
    @TableField(value = "gmt_create")
    private Date gmtCreate;

    /**
     * 更新时间
     */
    @TableField(value = "gmt_modified")
    private Date gmtModified;

    private static final long serialVersionUID = 1L;

    public static final String COL_ID = "id";

    public static final String COL_GOODS_SKU_ID = "goods_sku_id";

    public static final String COL_SALE_STOCK_QUANTITY = "sale_stock_quantity";

    public static final String COL_LOCKED_STOCK_QUANTITY = "locked_stock_quantity";

    public static final String COL_SALED_STOCK_QUANTITY = "saled_stock_quantity";

    public static final String COL_STOCK_STATUS = "stock_status";

    public static final String COL_GMT_CREATE = "gmt_create";

    public static final String COL_GMT_MODIFIED = "gmt_modified";
}